package com.yunweiweishi.xuhuanpaltform.yuhuan_app.service.imp;

import com.yunweiweishi.xuhuanpaltform.yuhuan_app.dao.EquipmentTypeDao;
import com.yunweiweishi.xuhuanpaltform.yuhuan_app.pojo.EquipmentType;
import com.yunweiweishi.xuhuanpaltform.yuhuan_app.service.EquipmentTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;


@Service
@Transactional
public class EquipmentTypeServiceImpl implements EquipmentTypeService {




   @Autowired
    private EquipmentTypeDao equipmentTypeDao;


    @Override
    public EquipmentType findByEquipmentTypeName(String equipmentTypeName) {
        return equipmentTypeDao.findByEquipmentTypeName(equipmentTypeName);
    }

    @Override
    public void addEquipmentType(EquipmentType equipmentType) {
        equipmentTypeDao.save(equipmentType);
    }

    @Override
    public void updateEquipmentType(EquipmentType equipmentType) {
        equipmentTypeDao.save(equipmentType);
    }



    @Override
    public void deleteEquipmentTypeById(Long id) {
        equipmentTypeDao.deleteById(id);

    }


}
